#include "stdafx.h"
#include "XHTTPTCPServiceRebot.h"

IMPLEMENT_DYNCREATE(XHTTPTCPServiceRebot) 

XHTTPTCPServiceRebot::XHTTPTCPServiceRebot(void)
{
	objName = "XHTTPTCPServiceRebot";
	//m_lpszClassName = "ConfigureRebot";
	objType = E_OBJECT_TYPE::XOBJECT;
}


XHTTPTCPServiceRebot::~XHTTPTCPServiceRebot(void)
{
	delete mpServer;
}

unsigned int XHTTPTCPServiceRebot::Init(const char * host, int port, string& serverType)
{
	printf("XHTTPTCPServiceRebot: start...\" %s\" :%d :%s \n", host, port, serverType.c_str());

	mpServer = new CIocp;
	mpServer->CreateListenSocket(host,port, serverType);
	mpServer->InitIOPort();
	mpServer->ListenEx(10);

	return 0;
}
